<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<meta name="keywords" content="Nacos,2.0.0" />
	<meta name="description" content="Nacos 2.0.0-BETA" />
	<!-- 网页标签标题 -->
	<title>Nacos 2.0.0-BETA</title>
	<link rel="shortcut icon" href="https://img.alicdn.com/tfs/TB1hgJpHAPoK1RjSZKbXXX1IXXa-64-64.png"/>
	<link rel="stylesheet" href="/build/documentation.css" />
</head>
<body>
	<div id="root"><div class="documentation-page" data-reactroot=""><header class="header-container header-container-normal"><div class="header-body"><a href="/en-us/index.html"><img class="logo" src="/img/nacos_colorful.png"/></a><div class="search search-normal"><span class="icon-search"></span></div><span class="language-switch language-switch-normal">中</span><div class="header-menu"><img class="header-menu-toggle" src="/img/menu_gray.png"/><ul><li class="menu-item menu-item-normal"><a href="/en-us/index.html">HOME</a></li><li class="menu-item menu-item-normal menu-item-normal-active"><a href="/en-us/docs/quick-start.html">DOCS</a></li><li class="menu-item menu-item-normal"><a href="/en-us/blog">BLOG</a></li><li class="menu-item menu-item-normal"><a href="/en-us/community">COMMUNITY</a></li><li class="menu-item menu-item-normal"><a href="https://cn.aliyun.com/product/aliware/mse?spm=nacos-website.topbar.0.0.0">NACOS IN CLOUD</a><img class="menu-img" src="https://img.alicdn.com/tfs/TB1esl_m.T1gK0jSZFrXXcNCXXa-200-200.png"/></li><li class="menu-item menu-item-normal"><a href="http://console.nacos.io/nacos/index.html">DEMO-CONSOLE</a></li></ul></div></div></header><div class="bar"><div class="bar-body"><img src="/img/docs.png" class="front-img"/><div class="bar-title"><span>Documentation</span><div class="bone bone-light"></div></div><img src="/img/docs.png" class="back-img"/></div></div><section class="content-section"><div class="content-body"><div class="sidemenu"><div class="sidemenu-toggle"><img src="https://img.alicdn.com/tfs/TB1E6apXHGYBuNjy0FoXXciBFXa-200-200.png"/></div><ul><li class="menu-item menu-item-level-1"><span>Nacos </span><ul><li style="height:180px;overflow:hidden" class="menu-item menu-item-level-2"><span>What is Nacos<img style="transform:rotate(0deg)" class="menu-toggle" src="/img/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/en-us/docs/what-is-nacos.html" target="_self">What is Nacos</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/concepts.html" target="_self">Concepts</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/architecture.html" target="_self">Architecure</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/feature-list.html" target="_self">Feature list</a></li></ul></li><li style="height:324px;overflow:hidden" class="menu-item menu-item-level-2"><span>Quick Start<img style="transform:rotate(0deg)" class="menu-toggle" src="/img/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/en-us/docs/quick-start.html" target="_self">Nacos</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/quick-start-spring.html" target="_self">Nacos Spring</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/quick-start-spring-boot.html" target="_self">Nacos Spring Boot</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/quick-start-spring-cloud.html" target="_self">Nacos Spring Cloud</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/quick-start-docker.html" target="_self">Nacos Docker</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/use-nacos-with-dubbo.html" target="_self">Nacos with Dubbo</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/use-nacos-with-kubernetes.html" target="_self">Nacos with K8s</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/nacos-sync.html" target="_self">Nacos Sync</a></li></ul></li><li style="height:288px;overflow:hidden" class="menu-item menu-item-level-2"><span>User Guide<img style="transform:rotate(0deg)" class="menu-toggle" src="/img/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/en-us/docs/sdk.html" target="_self">Java SDK</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/other-language.html" target="_self">Other Language</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/open-api.html" target="_self">Open-API</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/nacos-spring.html" target="_self">Nacos Spring</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/system-configurations.html" target="_self">Nacos System Configurations</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/auth.html" target="_self">Authentication</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/faq.html" target="_self">FAQ</a></li></ul></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><span>Admin Guide<img style="transform:rotate(-90deg)" class="menu-toggle" src="/img/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/en-us/docs/deployment.html" target="_self">Deployment Guide</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/cluster-mode-quick-start.html" target="_self">Cluster Mode Deployment</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/management-api.html" target="_self">Management OpenAPI</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/console-guide.html" target="_self">Admin Console Guide</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/monitor-guide.html" target="_self">Nacos Monitor Guide</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/nacos-config-benchmark.html" target="_self">Nacos Config Benchmark</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/nacos2-config-benchmark.html" target="_self">Nacos2.0 Config Benchmark</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/nacos-naming-benchmark.html" target="_self">Nacos Naming Benchmark</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/nacos2-naming-benchmark.html" target="_self">Nacos2.0 Naming Benchmark</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/nacos-sync-use.html" target="_self">Data Migration to Nacos</a></li></ul></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><span>Nacos 2.0<img style="transform:rotate(-90deg)" class="menu-toggle" src="/img/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/zh-cn/docs/2.0.0-alpha.html" target="_self">2.0-BETA</a></li><li class="menu-item menu-item-level-3"><a href="/zh-cn/docs/2.0.0-upgrading.html" target="_self">Upgrading</a></li></ul></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><span>Contributor Guide<img style="transform:rotate(-90deg)" class="menu-toggle" src="/img/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/en-us/docs/contributing.html" target="_self">Contribute to Nacos</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/contributing-flow.html" target="_self">Contributing Flow</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/pull-request.html" target="_self">Pull Request Template</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/how-to-reporting-bugs.html" target="_self">How to report bugs</a></li></ul></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><span>Community<img style="transform:rotate(-90deg)" class="menu-toggle" src="/img/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/en-us/docs/community.html" target="_self">Community</a></li><li class="menu-item menu-item-level-3"><a href="/en-us/docs/nacos-dev.html" target="_self">Develop Team</a></li></ul></li></ul></li></ul></div><div class="doc-content markdown-body"><h1>Nacos 2.0.0-BETA</h1>
<p>After nearly 5 months of discussion and development in the community, the core features of Nacos 2.0.0 based on the long connection have been developed completely.</p>
<p>2.0.0-BETA.2 public testing for community currently.</p>
<p><strong>Note that the ALPHA and BETA version is only for testing and discussion, please use it in uat or pre-environment. The interface API and features presentation results provided by the ALPHA and BETA version may be inconsistent with the release version, please refer to the release version.</strong></p>
<p>The 2.0.0-ALPHA version is an independent version temporarily, and not support upgrade server from version 1.X to 2.0.0-ALPHA smoothly. The release version will support it. Please pay attention to the subsequent upgrade documents.</p>
<p>2.0.0-BETA adds the ability to smoothly upgrade and downgrade, please refer to <a href="">Nacos2.0 upgrade document</a> for details.</p>
<h2>Benchmark for Nacos 2.0.0</h2>
<p>Detail see: <a href="/en-us/docs/nacos2-naming-benchmark.html">Nacos2.0 Naming Benchmark</a> and <a href="/en-us/docs/nacos2-config-benchmark.html">Nacos2.0 Config Benchmark</a> .</p>
<h2>Deployment</h2>
<p>Refer to <a href="https://nacos.io/en-us/docs/deployment.html">Deployment Guide</a> and replace the version to 2.0.0-BETA.</p>
<h2>Features completion and adaptation for the old client</h2>
<h3>Configuration Management</h3>
<h4>JAVA SDK</h4>
<ul>
<li>Completely compatible with all interfaces of 1.X client;</li>
<li>Completely implement all interfaces of 2.X client.</li>
</ul>
<h4>Other SDK</h4>
<ul>
<li>Completely compatible</li>
</ul>
<h4>openAPI</h4>
<ul>
<li>Fully compatible with all openAPIs related to the configuration management.</li>
</ul>
<h3>Service Discovery</h3>
<p>Due to major changes in the data model of service discovery, A few features are temporarily unsupported.</p>
<h4>JAVA SDK</h4>
<ul>
<li>Not support registration of persistent instances temporarily;</li>
<li>Compatible with ephemeral instances interfaces;</li>
<li>Implement with ephemeral instances interfaces;</li>
</ul>
<h4>Other SDK</h4>
<ul>
<li>Compatible with all operation of ephemeral instances interfaces;</li>
</ul>
<h4>openAPI</h4>
<ul>
<li>Register instance (Supported)</li>
<li>Deregister instance (Supported)</li>
<li>Modify instance (Supported)</li>
<li>Query instances (Supported)</li>
<li>Query instance detail (Supported)</li>
<li>Send instance beat (Supported)</li>
<li>Create service (Supported)</li>
<li>Delete service (Supported)</li>
<li>Update service (Supported)</li>
<li>Query service (Supported)</li>
<li>Query service list (Supported)</li>
<li>Query system switches (Supported)</li>
<li>Update system switch (Supported)</li>
<li>Query system metrics (Supported)</li>
<li>Query server list (Supported)</li>
<li>Query the leader of current cluster (Deprecated)</li>
<li>Update instance health status (Supported)</li>
<li>Batch update instance metadata(Beta, Not support)</li>
<li>Batch delete instance metadata(Beta, Not support)</li>
</ul>
<h3>Console</h3>
<ul>
<li>Completely compatible with <code>Config Management</code></li>
<li>Completely compatible with <code>Authority Control</code></li>
<li>Completely compatible with <code>Namespace</code></li>
<li>Completely compatible with <code>Cluster Managerment</code></li>
<li>Completely compatible with <code>Service Managerment</code></li>
</ul>
<h2>Ecological compatibility</h2>
<h3>Spring Cloud Alibaba</h3>
<p>Use Nacos 2.0 connection features by specifying nacos-client version.</p>
<pre><code>    &lt;dependency&gt;
        &lt;groupId&gt;com.alibaba.cloud&lt;/groupId&gt;
        &lt;artifactId&gt;spring-cloud-starter-alibaba-nacos-discovery&lt;/artifactId&gt;
        &lt;version&gt;2.1.5.RELEASE&lt;/version&gt;
        &lt;exclusions&gt;
            &lt;exclusion&gt;
                &lt;groupId&gt;com.alibaba.nacos&lt;/groupId&gt;
                &lt;artifactId&gt;nacos-client&lt;/artifactId&gt;
            &lt;/exclusion&gt;
        &lt;/exclusions&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;com.alibaba.cloud&lt;/groupId&gt;
        &lt;artifactId&gt;spring-cloud-starter-alibaba-nacos-config&lt;/artifactId&gt;
        &lt;version&gt;2.1.5.RELEASE&lt;/version&gt;
        &lt;exclusions&gt;
            &lt;exclusion&gt;
                &lt;groupId&gt;com.alibaba.nacos&lt;/groupId&gt;
                &lt;artifactId&gt;nacos-client&lt;/artifactId&gt;
            &lt;/exclusion&gt;
        &lt;/exclusions&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;com.alibaba.nacos&lt;/groupId&gt;
        &lt;artifactId&gt;nacos-client&lt;/artifactId&gt;
        &lt;version&gt;2.0.0-BETA&lt;/version&gt;
    &lt;/dependency&gt;
</code></pre>
<h3>Dubbo</h3>
<p>Because Dubbo obtains part of the Nacos client content through reflection in the configuration center (metadata center), it is temporarily incompatible with the 2.0.0-BETA version.
At present, we have communicated with the dubbo community to solve the adaptation problem as soon as possible.</p>
<h3>Nacos Spring Boot</h3>
<p>Nacos spring boot will release an BETA version with the new version of Nacos client.</p>
<h2>Usage</h2>
<h3>SDK and Console</h3>
<p>The usage of Nacos 2.0.0-BETA version is exactly the same as that of Nacos 1.X version. For the client interface, please refer to <a href="https://nacos.io/en-us/docs/sdk.html">JAVA SDK</a> of Nacos1.X.</p>
<h3>Server</h3>
<p>The deployment and usage of the Nacos 2.0.0-BETA server is not much different from the old version. Here only to describe the new configuration parameters in the new version.</p>
<table>
<thead>
<tr>
<th>Parameters</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>nacos.naming.clean.empty-service.interval</td>
<td>60000(ms)</td>
<td>The interval time of Nacos auto clean empty service. This parameter will replace <code>nacos.naming.empty-service.clean.period-time-ms</code> in old version.</td>
</tr>
<tr>
<td>nacos.naming.clean.empty-service.expired-time</td>
<td>60000(ms)</td>
<td>The expired time for Nacos judge whether an empty service is expired. When an empty service has no updated for setting time, it will be removed.</td>
</tr>
<tr>
<td>nacos.naming.clean.expired-metadata.interval</td>
<td>5000(ms)</td>
<td>The interval time of Nacos auto clean expired metadata.</td>
</tr>
<tr>
<td>nacos.naming.clean.expired-metadata.expired-time</td>
<td>60000(ms)</td>
<td>The expired time for Nacos judge whether a metadata is expired. When services or instances removed and after setting time, the metadata of removed services or instances will be deleted.</td>
</tr>
</tbody>
</table>
<h2>FAQ</h2>
<h3>Why can't upgrade smoothly? Can it be supported in future?</h3>
<p>Since the service model and data model of the Nacos service discovery have been redesigned, the data structure has major changes, so smoothly upgrading are temporarily not supported.</p>
<p>When 2.0.0 Released, will support part of 1.X version to upgrade smoothly. Please pay attention to community and upgrade document.</p>
<h3>Whether support the old client?</h3>
<p>Configuration Management can support all clients after 1.0, and Service Management can support all client after 1.2.</p>
<p>So recommending use Nacos client after 1.2.0.</p>
<p>But Nacos 1.X client can't use new connection features, so recommending to use 2.0.0 client strongly.</p>
<h3>Error <code>code:503,msg:server is DOWN now, please try again later!</code> during using.</h3>
<p>After version 1.4, Nacos use SOFA-Jraft to replace old raft implementation by nacos-self. Jraft will election leader with raft protocol and save the cluster metadata. If cluster restart with ip changed, it might cause Jraft can election leader successfully so that nacos can't start up.</p>
<p>The solution is removed the <code>data</code> directory under nacos directory and restart.</p>
<p>Or use <code>-Dnacos.server.ip=${domain}</code> jvm parameters to start nacos and set domain list in <code>nacos/conf/cluster.conf</code> to avoid the ip change effect.</p>
<h3><code>com.alibaba.nacos.consistency.entity</code> can't be found in source codes</h3>
<p>This package will be auto-generated by <code>protobuf</code>, so if you want to read source code or do some develop, you can use <code>mvn compile</code> to generate them. If you are using IDEA, you can also use IDEA's protobuf plugin.</p>
<h3>To be added...</h3>
</div></div></section><footer class="footer-container"><div class="footer-body"><img src="/img/nacos_gray.png"/><div class="cols-container"><div class="col col-12"><h3>Vision</h3><p>By providing an easy-to-use service infrastructure such as dynamic service discovery, service configuration, service sharing and management and etc., Nacos help users better construct, deliver and manage their own service platform, reuse and composite business service faster and deliver value of business innovation more quickly so as to win market for users in the era of cloud native and in all cloud environments, such as private, mixed, or public clouds.</p></div><div class="col col-6"><dl><dt>Documentation</dt><dd><a href="/en-us/docs/what-is-nacos.html" target="_self">Overview</a></dd><dd><a href="/en-us/docs/quick-start.html" target="_self">Quick start</a></dd><dd><a href="/en-us/docs/contributing.html" target="_self">Developer guide</a></dd></dl></div><div class="col col-6"><dl><dt>Resources</dt><dd><a href="/en-us/community/index.html" target="_self">Community</a></dd><dd><a href="https://cn.aliyun.com/product/aliware/mse?spm=nacos-website.topbar.0.0.0" target="_self">Cloud Service MSE</a></dd><dd><a href="https://www.aliyun.com/product/edas?source_type=nacos_pc_20181219" target="_self">Cloud Service EDAS</a></dd><dd><a href="https://www.aliyun.com/product/ahas?source_type=nacos_pc_20190225" target="_self">Cloud Service AHAS</a></dd></dl></div></div><div class="copyright"><span>@ 2018 The Nacos Authors | An Alibaba Middleware (Aliware) Project</span></div></div></footer></div></div>
	<script src="https://f.alicdn.com/react/15.4.1/react-with-addons.min.js"></script>
	<script src="https://f.alicdn.com/react/15.4.1/react-dom.min.js"></script>
	<script>
		window.rootPath = '';
  </script>
	<script src="/build/documentation.js"></script>
</body>
</html>